package com.ruoyi.system.outto.game.impl;


import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.exception.GlobalException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.model.domain.AccountInfo;
import com.ruoyi.system.model.domain.InfoImg;
import com.ruoyi.system.model.domain.SalePartner;
import com.ruoyi.system.model.mapper.AccountInfoMapper;
import com.ruoyi.system.model.mapper.InfoImgMapper;
import com.ruoyi.system.outto.core.LCConstant;
import com.ruoyi.system.outto.dto.yx7881.bean.*;
import com.ruoyi.system.outto.dto.yx7881.core.LieBaoCore;
import com.ruoyi.system.outto.game.IYX7881API;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;


@Slf4j
@Service
public class YX7881APIImpl implements IYX7881API {

    @Resource
    private InfoImgMapper infoImgMapper;
    @Resource
    private AccountInfoMapper accountInfoMapper;

    final String DefaultV = "看商品描述";

    /**
     * 判断 accountInfo salePartner 实体是否为空 and 判断一些异常账号不传递 and 给LieBaoCore类进行初始化值
     *
     * @param accountInfo
     * @param salePartner
     */
    private void pdObject(AccountInfo accountInfo, SalePartner salePartner) {
        if (Objects.isNull(accountInfo)) {
            throw new GlobalException("账号信息对象为空");
        }
        if (Objects.isNull(salePartner)) {
            throw new GlobalException("伙伴对象为空");
        }
        if (!LieBaoCore.checkBaseParam(salePartner)) {
            throw new GlobalException("伙伴对象配置异常,请重新配置!");
        }
        if (StringUtils.isEmpty(accountInfo.getLevel()) || StringUtils.equals("无二次", accountInfo.getLevel())) {
            throw new GlobalException(accountInfo.getId() + "无二次或为空");
        }
        if (StringUtils.equals("CF端游", accountInfo.getType()) && StringUtils.equals("邮箱已实名", accountInfo.getLevel())) {
            throw new GlobalException(accountInfo.getId() + "CF端游无level邮箱已实名选项");
        }
        if (StringUtils.isEmpty(accountInfo.getRegional())) {
            throw new GlobalException(accountInfo.getId() + "游戏大区为空");
        }
    }

    @Override
    public AjaxResult addGame(AccountInfo accountInfo, Long userId, SalePartner salePartner) {
        pdObject(accountInfo, salePartner);
        List<YX7881GoodsBean> list = new ArrayList<>();
        YX7881GoodsBean goodsBean = new YX7881GoodsBean();
        if ("王者荣耀".equals(accountInfo.getType())) {
            goodsBean = wzryInfo(accountInfo, goodsBean);
        } else if ("和平精英".equals(accountInfo.getType())) {
            goodsBean = hpjyInfo(accountInfo, goodsBean);
        } else if ("英雄联盟".equals(accountInfo.getType())) {
            goodsBean = yxlmInfo(accountInfo, goodsBean);
        } else if ("CF端游".equals(accountInfo.getType())) {
            goodsBean = cyhxCFInfo(accountInfo, goodsBean);
        } else if ("CF手游".equals(accountInfo.getType())) {
            goodsBean = cyhxQZWZInfo(accountInfo, goodsBean);
        } else if ("原神".equals(accountInfo.getType())) {
            goodsBean = ysInfo(accountInfo, goodsBean);
        } else {
            throw new GlobalException("《" + accountInfo.getType() + "》此游戏未对接");
        }
        goodsBean.setDeposit(new Short("0"));
        String title = accountInfo.getDes();
        if (Objects.nonNull(title)) {
            if (title.length() > 100) {
                title = title.substring(0, 90);
            }
            goodsBean.setTitle("xyr" + title);
        } else {
            goodsBean.setTitle("默认标题");
        }
        goodsBean.setGtId("100003");
        goodsBean.setEffective(0);
        goodsBean.setPerNum(new BigDecimal(1));
        goodsBean.setPhone("18888888888");
        goodsBean.setPrice(String.valueOf(accountInfo.getPrice()));
        goodsBean.setStock(1l);
        goodsBean.setUserId(LieBaoCore.USERID);
        goodsBean.setTradeTime("00:00-23:00");
        String ms = "xyr" + accountInfo.getId();
        goodsBean.setDescription(ms + accountInfo.getDes());
        Set<String> imgSet = new HashSet<>();
        if (Objects.nonNull(accountInfo.getTitleImg())) {
            imgSet.add(accountInfo.getTitleImg());
        }
        InfoImg infoImg = new InfoImg();
        infoImg.setInfoId(accountInfo.getId());
        infoImg.setType(Constants.STR_1);
        List<InfoImg> infoImgs = infoImgMapper.selectInfoImgList(infoImg);
        if (!CollectionUtils.isEmpty(infoImgs)) {
            for (InfoImg img : infoImgs) {
                imgSet.add(img.getImgUrl());
            }
        }
        if (CollectionUtils.isEmpty(imgSet)) {
            imgSet.add(LCConstant.defaultImg);
        }
        goodsBean.setImages(imgSet.toArray(new String[imgSet.size()]));
        list.add(goodsBean);
        ResultEntity resultEntity = null;
        try {
            resultEntity = LieBaoCore.publish(list, salePartner);
        } catch (Exception e) {
            e.printStackTrace();
        }
        Map<String, Object> result = new HashMap<>();
        if (resultEntity != null) {
            if (!"SUCCESS".equals(resultEntity.getCode())) {
                result.put("code", 500);
            } else {
                result.put("code", 200);
                String reaccount_id = ((String) resultEntity.getData()).replace("[", "").replace("]", "");
                AccountInfo info = accountInfoMapper.selectAccountInfoById(accountInfo.getId());
                info.setYX7881id(reaccount_id);
                accountInfoMapper.updateAccountInfo(info);
            }
            result.put("msg", resultEntity.getData());
        }
        result.put("req", JSONObject.toJSONString(list));
        result.put("res", resultEntity);
        return AjaxResult.success(result);
    }

    @Override
    public AjaxResult editGame(AccountInfo accountInfo, Long userId, SalePartner salePartner) {
        Long account_id = ReYX7881Id(accountInfo, salePartner);
        List<EditGoodsBean> editData = new ArrayList<>();
        EditGoodsBean editGoodsBean = new EditGoodsBean();
        editGoodsBean.setGoodsId(String.valueOf(account_id));
        editGoodsBean.setPrice(accountInfo.getPrice().doubleValue());
        editGoodsBean.setStock("1");
        editGoodsBean.setUserId(LieBaoCore.USERID);
        editData.add(editGoodsBean);
        Map<String, Object> result = new HashMap<>();
        ResultEntity resultEntity = null;
        try {
            resultEntity = LieBaoCore.edit(editData, salePartner);
        } catch (Exception e) {
            e.printStackTrace();
        }
        result.put("req", JSONObject.toJSONString(editData));
        result.put("res", resultEntity);
        if (resultEntity != null) {
            result.put("msg", resultEntity.getData());
        }
        return AjaxResult.success(result);
    }

    @Override
    public AjaxResult delGame(AccountInfo accountInfo, Long userId, SalePartner salePartner) {
        Long account_id = ReYX7881Id(accountInfo, salePartner);
        Long[] goodsId = new Long[]{account_id};
        Map<String, Object> result = new HashMap<>();
        try {
            ResultEntity resultXJ = shangpinxiajia(goodsId, salePartner);  //商品下架
            ResultEntity resultSC = shangpinshanchu(goodsId, salePartner);  //商品删除
            String dataSC = resultSC.getData().toString();
            if ("SUCCESS".equals(resultSC.getCode()) && StringUtils.equals(dataSC, "[]")) {
                result.put("code", 200);
                AccountInfo info = accountInfoMapper.selectAccountInfoById(accountInfo.getId());
                info.setYX7881id("");
                accountInfoMapper.updateAccountInfo(info);
            } else {
                result.put("code", 500);
            }
            result.put("res", resultSC);
            result.put("msg", dataSC);

        } catch (Exception e) {
            e.printStackTrace();
        }
        return AjaxResult.success(result);
    }

    /**
     * 返回YX7881id
     *
     * @param accountInfo
     * @param salePartner
     * @return
     */
    private Long ReYX7881Id(AccountInfo accountInfo, SalePartner salePartner) {
        pdObject(accountInfo, salePartner);
        Long YX7881id;
        if (StringUtils.isNotEmpty(accountInfo.getYX7881id())) {
            try {
                YX7881id = Long.parseLong(accountInfo.getYX7881id());
            } catch (Exception e) {
                throw new GlobalException(accountInfo.getId() + "的YX7881id转换失败");
            }
        } else {
            throw new GlobalException(accountInfo.getId() + "未找到YX7881id");
        }
        return YX7881id;
    }


    /**
     * 通用 比对方法 取第一个并返回
     *
     * @param str1
     * @param str2
     * @return
     */
    String biGetFirst(String str1, String str2) {
        String res = "";
        if (StringUtils.isEmpty(str2)) {
            return res;
        }
        String[] str1sz = str1.split(",");
        for (String s : str1sz) {
            if (str2.replace("贵族", "V").toUpperCase().replace("IP", "").contains(s)) {
                res = s;
                break;
            }
        }
        return res;
    }

    /**
     * 英雄联盟 段位 比对方法 取第一个并返回 为了不跟其他游戏比较相互影响单拉出来
     *
     * @param str1
     * @param str2
     * @return
     */
    String yxlmdwbiGetFirst(String str1, String str2) {
        //黑铁,黄铜,白银,黄金,铂金,钻石,大师,宗师,王者
        String res = "";
        if (StringUtils.isEmpty(str2)) {
            return res;
        }
        String[] str1sz = str1.split(",");
        for (String s : str1sz) {
            String a = s;
            if (str2.contains(a)) {
                res = s;
                break;
            }
        }
        return res;
    }

    /**
     * 通用 比对方法 比对成功加上
     *
     * @param str1
     * @param str2
     * @return
     */
    String biGetAll(String str1, String str2) {
        String res = "";
        if (StringUtils.isEmpty(str2)) {
            return res;
        }
        String[] str1sz = str1.split(",");
        boolean is = false;
        for (String s : str1sz) {
            if (str2.replace("·", "")
                    .replace("(", "")
                    .replace(")", "")
                    .replace("角色-", "").contains(s.replace("·", "")
                            .replace("(", "")
                            .replace(")", "")
                            .replace("角色-", ""))) {
                res = res + "," + s;
            }
        }
        if (res.length() > 0) {
            res = res.replaceFirst(",", "");
        }
        return res;
    }

    /**
     * 穿越火线端游 比对方法 比对成功加上 为了不跟其他游戏比较相互影响单拉出来
     *
     * @param str1
     * @param str2
     * @return
     */
    String CyhxCFbiGetAll(String str1, String str2) {
        String res = "";
        if (StringUtils.isEmpty(str2)) {
            return res;
        }
        String[] str1sz = str1.split(",");
        boolean is = false;
        for (String s : str1sz) {
            if (str2.replace("·", "")
                    .replace("(", "")
                    .replace(")", "")
                    .replace("-", "")
                    .contains(s.replace("·", "")
                            .replace("(", "")
                            .replace(")", "")
                            .replace("-", ""))) {
                res = res + "," + s;
            }
        }
        if (res.length() > 0) {
            res = res.replaceFirst(",", "");
        }
        return res;
    }

    /**
     * 根据游戏id获取该游戏信息
     *
     * @param gameid
     */
    void getGameInfo(String gameid) {
        String gtId = "100003";
        String result = null;
        try {
            result = LieBaoCore.get_game_info(gameid, null);
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println(result);
    }

    /**
     * 根据游戏id获取该游戏垂直属性
     *
     * @param gameid
     */
    void getGameVertiacl(String gameid) {
        String gtId = "100003";
        String result = null;
        try {
            result = LieBaoCore.get_gamegt_vertical(gameid, gtId, null);
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println(result);
    }

    /**
     * 根据商品id进行下架
     *
     * @param goodsId
     * @param salePartner
     * @return
     * @throws Exception
     */
    ResultEntity shangpinxiajia(Long[] goodsId, SalePartner salePartner) throws Exception {
        Map params = new HashMap<>();
        params.put("goodsId", goodsId);
        params.put("enforce", "true");
        params.put("closedReason", "0");
        ResultEntity resultEntity = LieBaoCore.cp_goods_pull_off(params, salePartner);
        return resultEntity;
    }

    /**
     * 根据商品id进行删除
     *
     * @param goodsId
     * @param salePartner
     * @return
     * @throws Exception
     */
    ResultEntity shangpinshanchu(Long[] goodsId, SalePartner salePartner) throws Exception {
        Map params = new HashMap<>();
        params.put("goodsId", goodsId);
        ResultEntity resultEntity = LieBaoCore.cp_goods_delete(params, salePartner);
        return resultEntity;
    }


    /**
     * 封装 王者荣耀 信息
     *
     * @param accountInfo
     * @param goodsBean
     * @return
     */
    YX7881GoodsBean wzryInfo(AccountInfo accountInfo, YX7881GoodsBean goodsBean) {
        WzryInfo wzryInfo = new WzryInfo();
        switch (accountInfo.getRegional()) {
            case "安卓Q":
                goodsBean.setGameId("A2775");
                goodsBean.setCarrierId("A2775B001");
                goodsBean.setCarriername("QQ");
                goodsBean.setGroupId("A2775P003");
                goodsBean.setServerId("A2775P003001");
                break;
            case "安卓WX":
                goodsBean.setGameId("A2775");
                goodsBean.setCarrierId("A2775B002");
                goodsBean.setCarriername("微信");
                goodsBean.setGroupId("A2775P034");
                goodsBean.setServerId("A2775P034001");
                break;
            case "苹果Q":
                goodsBean.setGameId("A2705");
                goodsBean.setCarrierId("A2705Y002");
                goodsBean.setCarriername("QQ");
                goodsBean.setGroupId("A2705P003");
                goodsBean.setServerId("A2705P003001");
                break;
            case "苹果WX":
                goodsBean.setGameId("A2705");
                goodsBean.setCarrierId("A2705Y003");
                goodsBean.setCarriername("微信");
                goodsBean.setGroupId("A2705P011");
                goodsBean.setServerId("A2705P011001");
                break;
        }
        String des = accountInfo.getDes();
        wzryInfo.setAccountSource("我是号主");
        wzryInfo.setAntiaddiction("是");
        if (StringUtils.equals("可实名", accountInfo.getLevel()) || StringUtils.equals("有二次",
                accountInfo.getLevel())) {
            wzryInfo.setCanSecond("可二次");
        } else {
            wzryInfo.setCanSecond("不可二次");
        }
        String duanwei = "倔强青铜,秩序白银,荣耀黄金,尊贵铂金,永恒钻石,至尊星耀,最强王者,荣耀王者,无双王者";
        String dwres = biGetFirst(duanwei, des);
        if (StringUtils.isNotEmpty(dwres)) {
            wzryInfo.setSelect(dwres);
        } else {
            wzryInfo.setSelect(DefaultV);
        }
        String gzdj = "V1,V2,V3,V4,V5,V6,V7,V8,V9,V10";
        String djres = biGetFirst(gzdj, des);
        if (StringUtils.isNotEmpty(djres)) {
            wzryInfo.setNobility(djres);
        } else {
            wzryInfo.setNobility(DefaultV);
        }
        wzryInfo.setGameaccount(System.currentTimeMillis() + "" + accountInfo.getId()); // 只能为数字  怎么取值;
        wzryInfo.setGamepassword("wenkefu");
        String saiji = "狮心王,蜃楼王,妖精王,炼金王,凯尔特女王,狰,饕餮,烛龙,重明,穷奇,御狮,御霄,御旌,御銮,朔风刀,混沌棋,疑决卦,醍醐杖,原初探秘者,原初追逐者,万华元夜,演武夺魁,驱傩正仪," +
                "千军破阵,黎明之约,沙漠行僧,金庭之子,大漠名商,云中旅人,冰封战神,游园惊梦,遇见飞天,梁祝,李小龙,五谷丰登,猎兽之王,白昼王子,朔望之晖,蓝屏警告,赤莲之焰,驯魔猎人,神迹守卫,狮舞东方," +
                "星空之诺,夺宝奇兵,迷踪丽影,西部大镖客,暗影游猎,单次大作战,狂想玩偶猫,潮玩骑士王,云间偶戏,胡桃意想国,星级陆战队,航海奇遇记,圣弓游侠,真爱魔法,幻夜卜梦,火炮绅士,夜都怪侠,吟游魔法," +
                "午后时光,电玩高手,落雪兰心";
        String saijires = biGetAll(saiji, des);
        if (StringUtils.isNotEmpty(saijires)) {
            wzryInfo.setCode2(saijires);
        } else {
            wzryInfo.setCode2(DefaultV);
        }
        String neice = "女武神,胡桃夹子,优雅恋人,蔷薇恋人,玩趣恶龙";
        String neiceres = biGetAll(neice, des);
        if (StringUtils.isNotEmpty(neiceres)) {
            wzryInfo.setCode1(neiceres);
        } else {
            wzryInfo.setCode1(DefaultV);
        }
        String rydc = "赤影疾锋,九霄神辉,星域神启,鸣剑·曳影,倪克斯神谕,活力突击,无限飓风号,全息碎影,星空梦想,天鹅之梦,大秦宣太后,杀手不太冷,武则天,银.白咏叹调,幻阙歌";
        String dcres = biGetAll(rydc, des);
        if (StringUtils.isNotEmpty(dcres)) {
            wzryInfo.setHonrDC(dcres);
        } else {
            wzryInfo.setHonrDC(DefaultV);
        }
        String xcs = "星级治安官,时之思念,金色仲夏夜,幽冥火,幽冥之眼,幻海之心,未来机甲,零号·雷霆,时之愿境,时之羁绊,无限倾慕";
        String xcsres = biGetAll(xcs, des);
        if (StringUtils.isNotEmpty(xcsres)) {
            wzryInfo.setXySkin(xcsres);
        } else {
            wzryInfo.setXySkin(DefaultV);
        }
        String cspf = "枫霜尽,前尘镜,音你闪耀,深海之息,无尽星芒,无双飞将,挚爱花嫁,挚爱之约,启示之音,花朝如约,补天,异界灵契,绛天战甲,炽阳神光,启明星使,胖达荣荣,地狱之眼,地狱火,海洋之心," +
                "末日机甲,仲夏夜之梦,云霓雀翎,久胜战神,黄金狮子座,超时空战士,黄金射手座,黄金白羊座,猫影幻舞,时之恋人(男),一念神魔,云鹰飞将,冠军飞将,飞鸢探春,音你心动(男),音你心动(女),李逍遥," +
                "游龙清影,乞巧织情,淬星耀世,时之祈愿女";
        String cspfres = biGetAll(cspf, des);
        if (StringUtils.isNotEmpty(cspfres)) {
            wzryInfo.setCsSkin(cspfres);
        } else {
            wzryInfo.setCsSkin(DefaultV);
        }
        String xyxd = "寅虎·瑞焰,寅虎·赤拳,寅虎·御盾,寅虎·展翼,寅虎·心曲,祈雪灵祝,时雨天司,奔雷神使,御风骁将,白晶晶,零号·赤焰,至尊宝,梅西,瑞麟志,白虎志,青龙志,玄武志,朱雀志,凤求凰," +
                "武陵仙君,霸王别姬(女),真爱至上,大圣娶亲,一生所爱,天魔缭乱,引擎之心,纯白花嫁,太华,岱宗,玄嵩,幽恒,飞衡,奇迹圣诞,蜜橘之夏,神奇女侠,武圣,虎魄,神威,烈魂,龙胆,青春决赛季,默契交锋" +
                "(男),白鹤梁神女,乒乒小将,遇见胡旋,孙行者,猪悟能,女儿国国王,傲雪梅枪,山海·碧波行,山海·苍雷引,山海·玄木吟,山海·炽霜斩,山海·琳琅生,齐天大圣,冰霜神祇,无限倾心,诗剑行";
        String xyxdres = biGetAll(xyxd, des);
        if (StringUtils.isNotEmpty(xyxdres)) {
            wzryInfo.setXiySkin(xyxdres);
        } else {
            wzryInfo.setXiySkin(DefaultV);
        }
        String yzpf = "天狼运算者,白龙吟,逐梦之光,逐梦之影,逐梦之音,逐梦之翼,逐梦之星,如梦令(女),如梦令(男),凤凰于飞,冰霜恋舞曲,千年之狐,永曜之星,辉光之辰,美猴王,云端筑梦师,冰锋战神," +
                "魔法小厨娘,银河之约,遇见神鹿,修罗,无限星赏官,猫狗日记(男),猫狗日记(女),天狼绘梦者,天狼征服者,天狼狩猎者,高山流水,逆光追影者";
        String yzpfres = biGetAll(yzpf, des);
        if (StringUtils.isNotEmpty(yzpfres)) {
            wzryInfo.setGoodSkin(yzpfres);
        } else {
            wzryInfo.setGoodSkin(DefaultV);
        }
        wzryInfo.setGamepassword2("wenkefu");
        wzryInfo.setSkinCount(String.valueOf(accountInfo.getSkins()));
        wzryInfo.setHeroCount(String.valueOf(accountInfo.getHeroes()));
        if (StringUtils.isNotEmpty(accountInfo.getCampId())) {
            wzryInfo.setWzCampId(accountInfo.getCampId());
        } else {
            wzryInfo.setWzCampId(System.currentTimeMillis() + "");
        }
        wzryInfo.setWeixin("wenkefu");
        goodsBean.setPropertyList(wzryInfo);
        return goodsBean;
    }

    /**
     * 封装 和平精英 信息
     *
     * @param accountInfo
     * @param goodsBean
     * @return
     */
    YX7881GoodsBean hpjyInfo(AccountInfo accountInfo, YX7881GoodsBean goodsBean) {
        HpjyInfo hpjyInfo = new HpjyInfo();
        switch (accountInfo.getRegional()) {
            case "安卓Q":
                goodsBean.setGameId("A5454");
                goodsBean.setCarrierId("A5454Y002");
                goodsBean.setCarriername("QQ");
                goodsBean.setGroupId("A5454P001");
                goodsBean.setServerId("A5454P001001");
                break;
            case "安卓WX":
                goodsBean.setGameId("A5454");
                goodsBean.setCarrierId("A5454Y001");
                goodsBean.setCarriername("微信");
                goodsBean.setGroupId("A5454P002");
                goodsBean.setServerId("A5454P002001");
                break;
            case "苹果Q":
                goodsBean.setGameId("A5455");
                goodsBean.setCarrierId("A5455Y002");
                goodsBean.setCarriername("QQ");
                goodsBean.setGroupId("A5455P001");
                goodsBean.setServerId("A5455P001001");
                break;
            case "苹果WX":
                goodsBean.setGameId("A5455");
                goodsBean.setCarrierId("A5455Y001");
                goodsBean.setCarriername("微信");
                goodsBean.setGroupId("A5455P002");
                goodsBean.setServerId("A5455P002001");
                break;
        }
        hpjyInfo.setCode5("我是号主");
        hpjyInfo.setAntiaddiction("是");
        if (StringUtils.equals("可实名", accountInfo.getLevel()) || StringUtils.equals("有二次",
                accountInfo.getLevel()) || StringUtils.equals("实名已删", accountInfo.getLevel())) {
            hpjyInfo.setCanSecond("可二次");
        } else {
            hpjyInfo.setCanSecond("不可二次");
        }
        String des = accountInfo.getDes();
        hpjyInfo.setGameaccount(System.currentTimeMillis() + "" + accountInfo.getId());
        hpjyInfo.setGamepassword("wenkefu");
        hpjyInfo.setGamepasswordqr("wenkefu");
        String rmzy = "玛莎拉蒂Grecale(薄荷绿),玛莎拉蒂Grecale(幻星粉),玛莎拉蒂MC20(星石白),玛莎拉蒂MC20(幻星粉),玛莎拉蒂Quattroporte(夜幕蓝)," +
                "玛莎拉蒂Quattroporte(幻星粉),路特斯ELETRE(电光紫),路特斯ELETRE(花绽灰),路特斯ELETRE(冰川蓝),路特斯EVIJA(电光紫),路特斯EVIJA(星际黄)," +
                "兰博基尼Estoque银翼灰,兰博基尼Estoque炫光金,兰博基尼Estoque尊享铂,兰博基尼AventadorSVJ翡翠绿,兰博基尼AventadorSVJ炫光金," +
                "兰博基尼AventadorSVJ尊享铂,兰博基尼URUS明艳黄,兰博基尼URUS炫光金,兰博基尼URUS尊享铂,玛莎拉蒂金色,玛莎拉蒂蓝色,玛莎拉蒂粉色,南瓜车,Model3白色,Model3银色," +
                "Model3紫色,ModelX白色,ModelX银色,ModelX紫色,合金龙骨蓝色,合金龙骨绿色,合金龙骨红色,阿斯顿马丁DBS红色,阿斯顿马丁DBS绿色,阿斯顿马丁DBS金色," +
                "阿斯顿马丁DBX蓝色,阿斯顿马丁DBX橙色,阿斯顿马丁DBX金色,僚机-萌兔起飞,空客H135-蔚蓝之翼,空客H135-恋语之翼,双人摩托双刃魅影红色,双人摩托双刃魅影绿色,双人摩托双刃魅影金色," +
                "特斯拉Roadster水滴蓝,特斯拉Roadster沁心粉,特斯拉Roadster尊享铂,特斯拉Cybertruck极昼黑,特斯拉Cybertruck荒芜蓝,特斯拉Cybertruck镭光铂," +
                "快艇自由的鲸,塞莎KL27深潜蓝,塞莎KL27霓虹粉,塞莎KL27鲸之蓝,软萌羊咩咩,俏皮小熊猫,鬼马风驰,萌喵橘座,灵鼠银迹,焰龙咆哮,海龙奔腾,金龙耀世,急速兔兔车,双人摩托梦幻火箭";
        String rmztres = biGetAll(rmzy, des);
        if (StringUtils.isNotEmpty(rmztres)) {
            hpjyInfo.setCode6(rmztres);
        } else {
            hpjyInfo.setCode6(DefaultV);
        }
        String yztz = "角色-零号机,角色-初号机,角色-2号机,盖世英雄,复仇流浪者,梦幻火箭,雪国幻梦,甜心巧克力,宝贝奶油派,天使彩虹糖,赛罗闪耀型,闪耀迪迦,相思残雪,灵感创作师,朗月武圣,鸾凤武仙," +
                "霓裳武神,垂柳戏鸭,绒雪飘舞,傲雪凌霜,霁雪冰心,荒漠赏金,薄荷物语,岚岚物语,海盐物语,极限特训,快乐主宰,幻影战神,星际漫游者,数码大师,未来战士,南瓜骑士,粉色回忆,怪诞乔克,荒野猎神," +
                "深渊皇后,金曜白虎,木曜青龙,水曜玄武,火曜朱雀,土曜战麒,银河战甲,守护骑士,蝶舞迷情,精灵迷巫,星之信仰,华贵君王,天启纪元,麻辣鲜香锅,金风玉露,金属狂野,精灵氛围,智能音符,缤纷油彩," +
                "放客神游,深海曼妙,PEL轰鸣竞梦者,古堡领主,天禅智恒,慧云及圣,狩月元帅,琉璃脉冲,新星烈龙,向日葵,甜蜜誓约,心之恋语,极致幻想,星空之魅,扶摇飞仙,幻彩马卡龙,花间之火,潮汐统领,锦绣火鲤," +
                "鳞翅贤者,迷蝶贵族,星点战士,铁甲悍将,黄蜂伯爵,草莓生巧,诡面斩,俏皮狐尾,香水柠檬,苍蓝魅影,翡翠骑士,绚金战神,童趣迷兔,冰霜白皇,炙焰红王,银刃塞罗,暗翼战神,王牌四分卫,绮梦青鸾,星之彼岸," +
                "相思残雪,甜梦冰蝶,绿野柔风,馨动时刻,炙焰赤龙,飓风飞鹰,虎啸骄阳,枪炮玫瑰,蜜桃特工,蝶舞蔷薇,桀骜红莲,显圣真君,铁血龙王,葫芦兄弟,桀骜红莲,显圣真君,铁血龙王,焰龙焚天,银龙傲海,骨龙祭渊," +
                "沙场疾风,花影阑珊,俏雪寒霜,吟月归客,齐天大圣,洛天依,红伞翩翩,黑伞漫漫,黄伞悠悠,海渊国主,暗夜玫瑰,蓝莓炮弹";
        String yztzres = biGetAll(yztz, des);
        if (StringUtils.isNotEmpty(yztzres)) {
            hpjyInfo.setCode7(yztzres);
        } else {
            hpjyInfo.setCode7(DefaultV);
        }
        String rmtz = "老版火箭少女101,冥河战士,巡查员上衣,都市猎人,奇异狩猎者,雪山精英,金羽特工,暗影哥特,沙暴袭击者,狂沙舞者,赤蝎幽灵,寒蝎幽灵,派对舞王,黄金大亨,浪漫波比,仓鼠灰灰,折纸暴龙," +
                "深海小丑鱼,胖达团团,胖达圆圆,银河圣歌,闪耀星光,淡雅花蕊,奇迹天团,星光纪元,蔷薇魔法师,云纹魔法士,玲珑飞花,维京奇缘,萌神柯基,爱崽白熊,花面小丑,狂徒小丑,黑色刀锋,战斗矩阵,滨海厨神," +
                "好奇恐龙,奇趣企鹅,潮萌小黄鸭,威严将相,圣殿骑士,九霄,裁决冥王,赛博空间,五号元素,清香五月粽,软嫩糖心蛋,云丝凤蟒,新侠客行,夏日音浪,人鱼之吻,摇滚狂鲨,东方飞龙,爱神,智慧之神,众神之王," +
                "PEL摇滚竞梦者,PEL躁动竞梦者,乘风破浪,神秘黑猫,软萌银虎,大橘为重,顽皮玉兔,白月香洋装,风华少年志,不夜海上花,破蛋小黄鸡,沙漠守护者,罗小黑, 暴走罗小黑,激萌罗小黑,红酒骑士,舞夜骑士," +
                "机械冒险家,机械英豪,机械征服者,PEC最牛战神,驯鹿叮当,动感兔斯基人偶服,神奈川冲浪里,安第斯皇冠,荷鲁斯之眼,暗夜契约,纯白誓言,白虎圣者,青龙圣者,玄武圣者,朱雀圣者,丝绸行者,神秘舞者," +
                "粉甜马卡龙,蓝甜马卡龙,玫瑰恋情,本愿之火,辉星之火,浪客战士,静谧青瓷,娴静芝兰,深山诡影,萌主吾皇,薄荷蓝莓,抹茶蜜豆,隐空刺,影双刃,怪兽之王,韶华初心,梦之呓语,浪漫樱花,冰爽海盐,滑板小狐," +
                "山经魅狐,诡谋托雷基亚,骁骑迪迦,暗黑裁决,暗影爵士,炫光贝贝,超能拳王,击剑大师,星河入梦,梦起落英,梨园星光,快乐星愿,星梦畅游,灵绣,微雨春柳,暖风夏荷,鹤发童颜,蝎王蛇后,S1赛事,S2赛事," +
                "S3赛事,S4赛事,S5赛事,S6赛事,SS1特训,SS2特训,SS3特训,SS4特训,SS5特训,SS6特训,SS7特训,SS8特训,SS9特训,SS10特训,SS11特训,SS12特训," +
                "SS13特训,SS14特训,SS15特训,SS16特训,SS17特训,SS18特训,天之羽翼";
        String rmtzres = biGetAll(rmtz, des);
        if (StringUtils.isNotEmpty(rmtzres)) {
            hpjyInfo.setCode8(rmtzres);
        } else {
            hpjyInfo.setCode8(DefaultV);
        }
        String rmqx = "M416至情至圣,UMP玉魂精魄,M416五爪金龙,Mini14龙虾霸霸,SCAR-L梦幻火箭,UMP45雪国精灵,AKM炫紫旋律,AKM甜心宝贝,Kar98K伏魔团,M762甜蜜誓约," +
                "M416心之恋语,M24蹁跹演武,Vector灵感创作师,MG3炙焰牛王,Kar98K圣光天使,AUG妙趣可丽,M416暖熊萌萌,Vector环太平洋,汤姆逊-荒漠赏金,M249绒雪飘舞," +
                "M16A4垂柳戏鸭,SCAR-L甜梦小狐,UZI筑梦精灵,DP-28幻梦音符,AWM橘柚倾心,M762冷魅冰骑,UMP恐龙拽拽,Kar98K绿意幻情,Mini14绚金瑰梦,野牛流星咚咚," +
                "M762甜心娃娃,M24暗星紫秘,GROZA焦糖拿铁,SKS碧影闪光,SCARL青春物语,AKM百合蜜语,M24星之信仰,DP-28扶摇飞仙,AWM花间之火,Mini14荧光虫舞,SKS诡面斩," +
                "GROZA香水柠檬,M762激战未来,SCAR-L童趣迷兔,Kar98K暗翼战神,UZI绮梦青鸾,AUG星之彼岸,UMP45相思残雪,汤姆逊怪笑疯兔,AKM梦之光华,VSS烈焰拳霸,M249古战神甲," +
                "DP-28枪炮玫瑰,M16A4葫芦兄弟,SCAR-L机甲封神,AWM焰龙焚天,M416风花雪月,MG3洛神天依,Vector红伞翩翩,S12K海渊国主,SLR暗夜玫瑰,M249蓝莓炮弹, " +
                "M24-暗星紫秘";
        String rmqxres = biGetAll(rmqx, des);
        if (StringUtils.isNotEmpty(rmqxres)) {
            hpjyInfo.setCode9(rmqxres);
        } else {
            hpjyInfo.setCode9(DefaultV);
        }
        hpjyInfo.setCode1(DefaultV);//粉装数量
        hpjyInfo.setCode2(DefaultV);//特效枪数量
        hpjyInfo.setCode3(String.valueOf(accountInfo.getSuit()));//套装数量
        hpjyInfo.setCode4(String.valueOf(accountInfo.getGuns()));//枪皮数量
        hpjyInfo.setWeixin("wenkefu");
        hpjyInfo.setCode10(DefaultV);
        goodsBean.setPropertyList(hpjyInfo);
        return goodsBean;
    }

    /**
     * 封装 英雄联盟端游 信息
     *
     * @param accountInfo
     * @param goodsBean
     * @return
     */
    YX7881GoodsBean yxlmInfo(AccountInfo accountInfo, YX7881GoodsBean goodsBean) {
        YxlmInfo yxlmInfo = new YxlmInfo();
        String des = accountInfo.getDes();
        goodsBean.setGameId("G603");
        String yxlmqf = "峡谷之巅=G603P005002--G603P005, 班德尔城=G603P001004--G603P001, 日服=G603P006006--G603P006, " +
                "均衡教派=G603P001013--G603P001, 钢铁烈阳=G603P001012--G603P001, 扭曲丛林=G603P002006--G603P002, " +
                "欧服=G603P006002--G603P006, 皮城警备=G603P001020--G603P001, 试炼之地=G603P003001--G603P003, " +
                "征服之海=G603P001018--G603P001, 黑色玫瑰=G603P001010--G603P001, 巨神峰=G603P001007--G603P001, " +
                "水晶之痕=G603P001014--G603P001, 韩服=G603P006001--G603P006, 台服=G603P006005--G603P006, " +
                "弗雷尔卓德=G603P002003--G603P002, 无畏先锋=G603P002004--G603P002, 皮尔特沃夫=G603P001005--G603P001, " +
                "战争学院=G603P001006--G603P001, 雷瑟守备=G603P001008--G603P001, 艾欧尼亚=G603P001001--G603P001, " +
                "恕瑞玛=G603P002005--G603P002, 教育网专区=G603P001015--G603P001, 暗影岛=G603P001011--G603P001, " +
                "卡拉曼达=G603P001019--G603P001, 男爵领域=G603P005001--G603P005, 美服=G603P006003--G603P006, " +
                "裁决之地=G603P001009--G603P001, 守望之海=G603P001017--G603P001, 澳服=G603P006004--G603P006, " +
                "巨龙之巢=G603P002007--G603P002, 诺克萨斯=G603P001003--G603P001, 德玛西亚=G603P002002--G603P002, " +
                "影流=G603P001016--G603P001, 祖安=G603P001002--G603P001, 比尔吉沃特=G603P002001--G603P002";
        if (StringUtils.equals("网通", accountInfo.getRegional()) || StringUtils.equals("电信",
                accountInfo.getRegional())) {
            List<String> list1 = Arrays.asList(yxlmqf.split(","));
            String dd = des;
            if (Objects.nonNull(dd)) {
                if (dd.length() > 50) {
                    dd = dd.substring(0, 50);
                }
            } else {
                throw new GlobalException(accountInfo.getId() + "英雄联盟网通电信比对异常");
            }
            boolean f = false;
            for (String s : list1) {
                String[] rearray = s.split("=");
                if (dd.contains(rearray[0].trim())) {
                    f = true;
                    String str2 = rearray[1].trim();
                    String[] str2array = str2.split("--");
                    goodsBean.setGroupId(str2array[1].trim());
                    goodsBean.setServerId(str2array[0].trim());
                    break;
                }
            }
            if (!f) {
                throw new GlobalException(accountInfo.getId() + "英雄联盟网通电信比对未找到大区");
            }
        } else {
            Map qdqMap = stringTOmap(yxlmqf);
            if (Objects.nonNull(qdqMap.get(accountInfo.getRegional()))) {
                String qu = qdqMap.get(accountInfo.getRegional()).toString();
                goodsBean.setGroupId(qu.split("--")[1].trim());
                goodsBean.setServerId(qu.split("--")[0].trim());
            } else {
                throw new GlobalException(accountInfo.getId() + "英雄联盟大区未找到");
            }
        }
        if (StringUtils.equals("可实名", accountInfo.getLevel()) || StringUtils.equals("有二次",
                accountInfo.getLevel())) {
            yxlmInfo.setCode1("可二次");
        } else {
            yxlmInfo.setCode1("不可二次");
        }
        yxlmInfo.setLevel("30");
        yxlmInfo.setGameaccount(System.currentTimeMillis() + "" + accountInfo.getId());
        yxlmInfo.setGamepassword("wenkefu");
        yxlmInfo.setHeroCount(String.valueOf(accountInfo.getHeroes()));
        yxlmInfo.setGamepassword2("wenkefu");
        yxlmInfo.setSkinCount(String.valueOf(accountInfo.getSkins()));
        yxlmInfo.setCode11(DefaultV); //炫彩数量
        String dspdw = "坚韧黑铁,英勇黄铜,不屈白银,荣耀黄金,华贵铂金,璀璨钻石,超凡大师,傲世宗师,最强王者";
        String dspdwres = biGetFirst(dspdw, des);
        if (StringUtils.isNotEmpty(dspdwres)) {
            yxlmInfo.setSelect(dspdwres.substring(2, 4));
        } else {
            yxlmInfo.setSelect(DefaultV);
        }
        yxlmInfo.setGamerole("问客服"); //游戏角色名称
        yxlmInfo.setCode12(DefaultV); //灵活组排段位
        yxlmInfo.setCode13(DefaultV); //云顶之弈段位
        String zxtx = "燃烧花,女巫头,娜美头,猪妹头,奥莉安娜头,琴女手办,福神店长,雪花头,小鹿头";
        String zxtxres = biGetFirst(zxtx, des);
        if (StringUtils.isNotEmpty(zxtxres)) {
            yxlmInfo.setCode14(zxtxres);
        } else {
            yxlmInfo.setCode14(DefaultV);
        }
        String rmtx = "星守阿狸,璐璐手办,爱情鸽,爱心头,爱情之歌,觅心游侠卢锡安,觅心之翼奎因,周年男刀,玉剑传说寒潭夭夭,玉剑传说苍鸾,卡特琳娜的匕首,拓蛙,黑夜使者索拉卡,黎明使者索拉卡,暗星女皇拉克丝," +
                "耀星女皇拉克丝,春晖神女,源计划刀妹,星守索拉卡,勇者阿狸,永恒之森霞,,SSG霞,周年女刀,战斗学院拉克丝,银河魔装机神安妮";
        String rmtxres = biGetAll(rmtx, des);
        if (StringUtils.isNotEmpty(rmtxres)) {
            yxlmInfo.setCode15(rmtxres);
        } else {
            yxlmInfo.setCode15(DefaultV);
        }
        String zzpf = "至臻 K/DA 阿狸,至臻 K/DA 阿狸 (2022),至臻 K/DA 阿卡丽,至臻 K/DA 阿卡丽 (2022),至臻 K/DA ALL OUT 卡莎,至臻 K/DA 卡莎,至臻 " +
                "K/DA 卡莎 (2022),至臻 K/DA 伊芙琳,至臻 K/DA 伊芙琳 (2022),至臻 征服者 贾克斯,至臻 真实伤害 亚索,至臻 真实伤害 赛娜,至臻 真实伤害 奇亚娜,至臻 战斗学院 " +
                "蕾欧娜,至臻 战斗学院 拉克丝,至臻 战斗学院 拉克丝 (2022),至臻 月蚀骑士 赛娜,至臻 源计划：正义 艾瑞莉娅,至臻 源计划：正义 艾瑞莉娅 (2022),至臻 源计划：阴 劫,至臻 " +
                "源计划：逆流 塞拉斯,至臻 玉剑传说 武剑仙,至臻 玉剑传说 武剑仙 (2022),至臻 焰执事 布兰德,至臻 腥红之月 亚托克斯,至臻 星之守护者 索拉卡,至臻 星之守护者 妮蔻,至臻 星之守护者 " +
                "妮蔻 (2022),至臻 星之守护者 艾克,至臻 星之守护者 辛德拉,至臻 太空律动 “节奏幻师” 璐璐,至臻 神龙尊者 炎龙瑟提,至臻 神龙尊者 均衡之龙 沃利贝尔,至臻 神凰行者 烈羽焰凰 霞," +
                "至臻 绒毛菲兹,至臻 绒毛菲兹 (2022),至臻 青花瓷 拉克丝,至臻 女帝 黛安娜,至臻 魔女 乐芙兰,至臻 魔女 婕拉,至臻 魅惑女巫 莫甘娜,至臻 魅惑女巫 厄运小姐,至臻 魅惑女巫 厄运小姐" +
                " (2022),至臻 灵能特工 伊泽瑞尔,至臻 灵魂莲华 提莫,至臻 烈焰美人 薇恩,至臻 烈焰美人 薇恩 (2022),至臻 幻灵战斗猫 金克丝,至臻 黑夜使者 李青,至臻 黑夜使者 李青 " +
                "(2022),至臻 黑夜使者 凯隐,至臻 福牛守护者 菲奥娜,至臻 飞升战神 潘森,至臻 电玩女神 凯特琳,至臻 电玩女神 凯特琳 (2022),至臻 奥术师 佐伊,至臻 暗星 墨菲特,至臻 西部魔影" +
                " 猎天使恶魔 泰隆,至臻 海之歌 萨勒芬妮,至臻 未来战士 卢锡安,至臻 未来战士 锤石,至臻 未来战士 锤石 (2022),至臻 太空律动 “魔音海妖” 娜美,至臻 王国机神玄武 盖伦,至臻 " +
                "海珀利安小队 X09-星环灵风 迦娜,至臻 灵魂莲华 易,至臻 至高天 奎桑提";
        String zzpfres = biGetAll(zzpf, des);
        if (StringUtils.isNotEmpty(zzpfres)) {
            yxlmInfo.setCode16(zzpfres);
        } else {
            yxlmInfo.setCode16(DefaultV);
        }
        String hkspf = "海克斯科技 阿利斯塔,海克斯科技 阿木木,海克斯科技 安妮,海克斯科技 波比,海克斯科技 崔丝塔娜,海克斯科技 吉格斯,海克斯科技 嘉文四世,海克斯科技 卡萨丁,海克斯科技 克格莫," +
                "海克斯科技 拉莫斯,海克斯科技 雷克顿,海克斯科技 玛尔扎哈,海克斯科技 魔腾,海克斯科技 瑟庄妮,海克斯科技 斯维因,海克斯科技 迦娜,灰烬骑士 派克,灰烬征服者 潘森,恐惧新星 德莱厄斯,零之枪骑" +
                " 赫卡里姆,摄魂使者 薇恩,新创战纪 希维尔";
        String hkspfres = biGetAll(hkspf, des);
        if (StringUtils.isNotEmpty(hkspfres)) {
            yxlmInfo.setCode17(hkspfres);
        } else {
            yxlmInfo.setCode17(DefaultV);
        }
        String zxxd = "至死不渝 瑞兹,莲花之令 卡尔玛,冰原核弹 古拉加斯,龙的传人 李青,安妮梦游仙境,巨角幻兽 阿利斯塔,暗黑灵魂 阿利斯塔,哥特萝莉 安妮,庆典女皇 艾尼维亚,生化领主 泰达米尔," +
                "奥斯曼大帝 泰达米尔,奥斯曼大帝 普朗克,银白审判 凯尔,钢铁军团 拉克丝,战熊骑士 瑟庄妮,元老议会 玛尔扎哈,青年 瑞兹,守护者雕像 瑞兹,创星之灵 璐璐,冰原狙击 凯特琳,粉色萝莉 崔丝塔娜," +
                "万夫莫开 贾克斯,舞会公主 安妮,养蜂人 辛吉德,国王 泰达米尔,诸神的黄昏 泰达米尔";
        String zxxdres = biGetAll(zxxd, des);
        if (StringUtils.isNotEmpty(zxxdres)) {
            yxlmInfo.setCode18(zxxdres);
        } else {
            yxlmInfo.setCode18(DefaultV);
        }
        String lxpf = "龙的传人 李青,银龙裁决 泰隆,古琴余韵 娑娜,定海神珍 孙悟空,神龙烈焰 金克丝,醒狮 克格莫,“你看见过我的熊猫吗？”安妮,神龙之翼 库奇,春晖神女 拉克丝,广寒仙子 嫦娥,紫金罗刹 " +
                "莫甘娜,替父从军 花木兰,玉净夜叉 凯特琳,碧玉之牙 卡西奥佩娅,虎痴之拳 蔚,司马懿 仲达,张辽 文远,南天之怒 沃里克 ,美猴王 孙悟空,烈焰美人 薇恩,金猪烈焰 瑟庄妮,北辰之威 内瑟斯," +
                "王国机神青龙 德莱文,王国机神朱雀 蕾欧娜,王国机神苍狼 瑟提,王国机神白虎 贾克斯,王国机神玄武 盖伦,福牛守护者 安妮,福牛守护者 厄斐琉斯,福牛守护者 德莱厄斯,福牛守护者 阿利斯塔,福牛守护者" +
                " 嘉文四世,福牛守护者 菲奥娜,福牛守护者 佛耶戈,纳财大帝 塔姆";
        String lxpfres = biGetAll(lxpf, des);
        if (StringUtils.isNotEmpty(lxpfres)) {
            yxlmInfo.setCode19(lxpfres);
        } else {
            yxlmInfo.setCode19(DefaultV);
        }
        String qrjxd = "甜心宝贝 安妮,甜心宝贝 娑娜,甜心之羽 霞,甜心之翎 洛,碎心之拳 蔚,穿心之剑 菲奥娜,觅心萝莉 金克丝,觅心猎手 薇恩,觅心之翼 奎因,觅心游侠 卢锡安,觅心猫猫 悠米,觅心女王 " +
                "艾希,觅心魔灵 奥莉安娜,幽梦玫瑰 辛德拉,幽梦玫瑰 泰隆,幽梦玫瑰 泽丽,幽梦玫瑰 伊莉丝,水晶玫瑰 阿克尚,水晶玫瑰 斯维因,水晶玫瑰 婕拉,水晶玫瑰 迦娜";
        String qrjxdres = biGetAll(qrjxd, des);
        if (StringUtils.isNotEmpty(qrjxdres)) {
            yxlmInfo.setCode20(qrjxdres);
        } else {
            yxlmInfo.setCode20(DefaultV);
        }
        String bxxd = "冬境仙灵 索拉卡,平安夜女神 娑娜,冰雪风暴 希维尔,圣诞老人 布隆,圣诞老人 德莱文,冰封王子 蒙多,狂心冰王 图奇,持胡萝卜的雪人 易,魄罗骑士 瑟庄妮,冰雪驯鹿 波比,夺命美人 " +
                "卡特琳娜,圣诞糖果棒 厄运小姐,圣诞捣蛋鬼 金克丝,冰雪女神 辛德拉,寒冬精灵 璐璐,冬季仙境 卡尔玛,冬季仙境 奥莉安娜";
        String bxxdres = biGetAll(bxxd, des);
        if (StringUtils.isNotEmpty(bxxdres)) {
            yxlmInfo.setCode21(bxxdres);
        } else {
            yxlmInfo.setCode21(DefaultV);
        }
        String zxxc = "龙的传人 李青 潜龙勿用,龙的传人 李青 跃龙在渊,龙的传人 李青 飞龙在天,龙的传人 李青 亢龙有悔,龙的传人 李青 乘龙御天,龙的传人 李青 见龙在田,龙的传人 李青 龙战于野," +
                "龙的传人 李青 龙德而隐";
        String zxxcres = biGetAll(zxxc, des);
        if (StringUtils.isNotEmpty(zxxcres)) {
            yxlmInfo.setCode22(zxxcres);
        } else {
            yxlmInfo.setCode22(DefaultV);
        }
        goodsBean.setPropertyList(yxlmInfo);
        return goodsBean;
    }

    /**
     * 封装 穿越火线端游 信息
     *
     * @param accountInfo
     * @param goodsBean
     * @return
     */
    YX7881GoodsBean cyhxCFInfo(AccountInfo accountInfo, YX7881GoodsBean goodsBean) {
        goodsBean.setGameId("G68");
        String des = accountInfo.getDes();
        String cyhxCFQF = "浙江二区=G68P001020--G68P001, 安徽一区=G68P001019--G68P001, 北京四区=G68P002007--G68P002, " +
                "上海二区=G68P001009--G68P001, 湖南二区=G68P006009--G68P006, 江苏二区=G68P001024--G68P001, " +
                "湖北二区=G68P006002--G68P006, 广东二区=G68P006004--G68P006, 辽宁三区=G68P002005--G68P002, " +
                "山东二区=G68P002015--G68P002, 湖南一区=G68P006008--G68P006, 河南一区=G68P002009--G68P002, " +
                "湖北一区=G68P006001--G68P006, 广东一区=G68P006003--G68P006, 北京二区=G68P002003--G68P002, " +
                "河北一区=G68P002013--G68P002, 广东四区=G68P006006--G68P006, 广西一区=G68P006011--G68P006, " +
                "北京一区=G68P002002--G68P002, 云南一区=G68P005005--G68P005, 河南二区=G68P002016--G68P002, " +
                "南方大区=G68P006007--G68P006, 陕西一区=G68P005001--G68P005, 重庆一区=G68P005002--G68P005, " +
                "辽宁一区=G68P002001--G68P002, 移动专区=G68P001025--G68P001, 吉林一区=G68P002012--G68P002, " +
                "辽宁二区=G68P002004--G68P002, 教育网专区=G68P001026--G68P001, 江西一区=G68P006010--G68P006, " +
                "广东三区=G68P006005--G68P006, 北京三区=G68P002006--G68P002, 山东一区=G68P002010--G68P002, " +
                "江苏一区=G68P001018--G68P001, 福建一区=G68P001001--G68P001, 浙江一区=G68P001002--G68P001, " +
                "黑龙江区=G68P002011--G68P002, 四川二区=G68P005004--G68P005, 上海一区=G68P001008--G68P001, " +
                "四川一区=G68P005003--G68P005, 北方大区=G68P002008--G68P002, 山西一区=G68P002014--G68P002";
        List<String> list1 = Arrays.asList(cyhxCFQF.split(","));
        String dd = des;
        if (Objects.nonNull(dd) && dd.length() > 25) {
            dd = dd.substring(0, 25).replace("1", "一")
                    .replace("2", "二")
                    .replace("3", "三")
                    .replace("4", "四");
        } else {
            throw new GlobalException(accountInfo.getId() + "穿越火线大区比对处理异常");
        }
        for (String s : list1) {
            String[] rearray = s.split("=");
            if (dd.contains(rearray[0].trim())) {
                String str2 = rearray[1].trim();
                String[] str2array = str2.split("--");
                goodsBean.setGroupId(str2array[1].trim());
                goodsBean.setServerId(str2array[0].trim());
                break;
            }
        }
        CyhxCFInfo cyhxCFInfo = new CyhxCFInfo();
        cyhxCFInfo.setCode4("我是号主");
        String yxk = "M4A1-雷神音效卡,AK47-火麒麟音效卡,Barrett-毁灭音效卡,M4A1-黑龙音效卡,Barrett-极光音效卡,AWM-裁决音效卡,QBZ03-金色蔷薇音效卡,Scar " +
                "Light-白虎音效卡,Kar98k-星神音效卡,M200-幻神音效卡,M4A1-黑骑士音效卡";
        String yxkres = CyhxCFbiGetAll(yxk, des);
        if (StringUtils.isNotEmpty(yxkres)) {
            cyhxCFInfo.setCode9(yxkres);
        } else {
            cyhxCFInfo.setCode9(DefaultV);
        }
        cyhxCFInfo.setAntiaddiction("是");
        if (StringUtils.equals("有二次", accountInfo.getLevel())) {
            cyhxCFInfo.setCanSecond("可二次");
        } else {
            cyhxCFInfo.setCanSecond("不可二次");
        }
        cyhxCFInfo.setCode5(DefaultV);//军衔
        cyhxCFInfo.setCode6(DefaultV);//英雄武器数量
        cyhxCFInfo.setGameaccount(System.currentTimeMillis() + "" + accountInfo.getId());
        cyhxCFInfo.setHero(DefaultV);//英雄角色数量
        cyhxCFInfo.setProps(DefaultV);//梦幻V数量
        String Vqiang = "9A91-烈火,AK12-天启,AK47-黑鲨,AK47-黑武士,AK47-火麒麟,AK47-机械迷城,AK47-雷暴,AK47-麒麟,AK47-无影,AN94-超新星,AWM-裁决," +
                "AWM-天龙,Barrett-毁灭,Barrett-极光,Barrett-雷霆,Barrett-朱雀,COP357-雷霆,COP-堕天神,Glock18-武圣,HK417-朱雀,M200-幻神," +
                "M4A1-堕天神,M4A1-黑龙,M4A1-黑骑士,M4A1-雷神,M4A1-雷霆,M4A1-猎神,M4A1-龙血,M4A1-玫瑰精灵,M4A1-千变,M4A1-青龙,M4A1-死神,M4A1-武圣," +
                "M4A1-夜魔,QBZ95-幻兽,RPK-盘龙,Scar-白虎,USP-雷暴,传说暗裔,传说光耀,加特林-炼狱,破空枪刃-夜魔,沙鹰-幻兽,沙鹰-天神,沙鹰-修罗,汤姆逊-烈龙,传说圣灵," +
                "Kar98K-星神,荣耀世冠-雷神,荣耀世冠-火麒麟,荣耀世冠-柯尔特,荣耀世冠-龙啸,传说梦魇,M200-竞技荣光,柯尔特-竞技荣光,擎天-竞技荣光,王者幻神";
        String Vqiangres = CyhxCFbiGetAll(Vqiang, des);
        if (StringUtils.isNotEmpty(Vqiangres)) {
            cyhxCFInfo.setCode7(Vqiangres);//V枪
        } else {
            cyhxCFInfo.setCode7(DefaultV);//V枪
        }
        String jiaose = "凌霄,迷迭香,春,炫,魅影,蝴蝶,瞳,樱,葵,零,审判者,传说女帝,电竞教官-云悠悠,影豹,雨棠,沙漠玫瑰,王者凌霄,王者涂鸦,王者玲珑-小乔,王者-迷迭香,王者零-华冠丽服," +
                "王者葵-惊若翩鸿,王者-零,王者之瞳,狐影,王者复仇,王者蝴蝶,堕落女神,王者王力宏,王者-葵-貂蝉,王者樱-热浪之夏,王者-魅影,王者-零-国色天香,王者-瞳-闭月羞花,王者玲珑,王者-救世主," +
                "王者零-传说之路,雅典娜,鹰";
        String jiaoseres = CyhxCFbiGetAll(jiaose, des);
        if (StringUtils.isNotEmpty(jiaoseres)) {
            cyhxCFInfo.setCode8(jiaoseres);//角色
        } else {
            cyhxCFInfo.setCode8(DefaultV);//角色
        }
        String pifu = "火麒麟-虎牙平台皮肤,火麒麟-斗鱼平台皮肤,雷神-虎牙平台皮肤,QBZ03-冠军之薇,黑龙-冠军之武 ,擎天-冠军之击 ,黑骑士-CFS2021,传奇石头-横秒之巅  ," +
                "麒麟刺-斗鱼平台皮肤 ,擎天-虎牙平台皮肤 ,擎天-冠军之击 ,幻神-周瑜皮肤,幻神-丹凤,幻神-青鹤,雷神-冠军之魄,黑骑士-冠军之势,龙啸-冠军之啸,炼狱-斗鱼平台皮肤,黑骑士-虎牙平台皮肤," +
                "火麒麟-冠军之心,毁灭-冠军之怒,修罗-冠军之魂,雷神-斗鱼平台皮肤,巴雷特-虎牙平台皮肤,雷神-荣耀之魄,毁灭-荣耀之怒,屠龙-荣耀之锋,雷神-荣耀世冠AG,雷神-宠儿-2019MVP," +
                "火麒麟-荣耀世冠AG,屠龙-荣耀世冠AG,雷神-R.LGD-CFPLS18冠军,黑骑士-AG-S4冠军典藏,荣耀之魄-CFPL十周年臻藏版,幻神-宠儿-2021MVP,幻神-冠军之幻," +
                "幻神-AG-CFPLS17冠军";
        String pifures = CyhxCFbiGetAll(pifu, des);
        if (StringUtils.isNotEmpty(pifures)) {
            cyhxCFInfo.setSkin(pifures);//皮肤
        } else {
            cyhxCFInfo.setSkin(DefaultV);//皮肤
        }
        String wuqi = "M4A1-幻灵,COP 357-幻灵,幻灵之锋,Barrett-电竞装甲,柯尔特-电竞装甲,尼泊尔-电竞装甲,龙啸-堕天神,斩神刀-雷暴,AA-12-雷霆,尼泊尔-雷霆,金钢伞,王者霜心," +
                "王者之霆,王者星神,王者风势,悦蓝-惊涛骇浪,王者凤吟,王者玉峰,王者青龙,M4A1-雷霆王者,Barrett-雷霆王者,COP 357-雷霆王者,雷霆王者之锋,QBZ-03-王者蔷薇,王者之烈," +
                "王者白虎,王者雷怒,王者火魄,王者蔷薇,王者之心,王者之魂,王者之魄,王者之力,王者之怒,王者之锋,王者之影,王者之光,玫瑰精灵-悦动,王者之武,王者之击,王者之势,王者之翼,王者之幻,王者之啸," +
                "王者之刺,天启-悦智,超新星-悦享,王者之灵,王者之戮,猎龙-悦心,炼狱-悦蓝,盘龙-悦心,王者之决,王者之鲨,王者炎心,王者冰魄,王者之城,王者之圣,王者汪汪-巴雷特,王者AK47-萌萌银发刀锋," +
                "王者M4A1-萌萌金发刀锋,王者猛虎M4A1,牛牛-AK,猫猫Cop 357,牛牛AK47-贵族金,黄金猫猫手套,王者-C.A.T,斯泰尔-蝴蝶,黄金猫猫手套-白鲨";
        String wuqires = CyhxCFbiGetAll(wuqi, des);
        if (StringUtils.isNotEmpty(wuqires)) {
            cyhxCFInfo.setCode1(wuqires);//武器
        } else {
            cyhxCFInfo.setCode1(DefaultV);//武器
        }
        cyhxCFInfo.setGamepassword("wenkefu");
        cyhxCFInfo.setGamepassword2("wenkefu");
        cyhxCFInfo.setGamerole("问客服");
        cyhxCFInfo.setWeixin("wenkefu");
        goodsBean.setPropertyList(cyhxCFInfo);
        return goodsBean;
    }

    /**
     * 封装 穿越火线手游 信息
     *
     * @param accountInfo
     * @param goodsBean
     * @return
     */
    YX7881GoodsBean cyhxQZWZInfo(AccountInfo accountInfo, YX7881GoodsBean goodsBean) {
        CyhxQZWZInfo cyhxQZWZInfo = new CyhxQZWZInfo();
        goodsBean.setGameId("A5430");
        switch (accountInfo.getRegional()) {
            case "安卓Q":
                goodsBean.setCarrierId("A5430Y003");
                goodsBean.setCarriername("安卓QQ");
                goodsBean.setGroupId("A5430P002");
                goodsBean.setServerId("A5430P002001");
                break;
            case "安卓WX":
                goodsBean.setCarrierId("A5430Y004");
                goodsBean.setCarriername("安卓微信");
                goodsBean.setGroupId("A5430P004");
                goodsBean.setServerId("A5430P004001");
                break;
            case "苹果Q":
                goodsBean.setCarrierId("A5430Y005");
                goodsBean.setCarriername("苹果QQ");
                goodsBean.setGroupId("A5430P001");
                goodsBean.setServerId("A5430P001001");
                break;
            case "苹果WX":
                goodsBean.setCarrierId("A5430Y006");
                goodsBean.setCarriername("苹果微信");
                goodsBean.setGroupId("A5430P003");
                goodsBean.setServerId("A5430P003001");
                break;
        }
        String des = accountInfo.getDes();
        cyhxQZWZInfo.setCode5("我是号主");
        cyhxQZWZInfo.setGameaccount(System.currentTimeMillis() + "" + accountInfo.getId());
        cyhxQZWZInfo.setGamepassword("wenkefu");
        cyhxQZWZInfo.setGamepasswordqr("wenkefu");
        cyhxQZWZInfo.setGamerole("问客服");
        cyhxQZWZInfo.setAntiaddiction("是");
        cyhxQZWZInfo.setWeixin("wenkefu");
        if (StringUtils.equals("有二次", accountInfo.getLevel())) {
            cyhxQZWZInfo.setCanSecond("可二次");
        } else {
            cyhxQZWZInfo.setCanSecond("不可二次");
        }
        String VIPdj = "V1,V2,V3,V4,V5,V6,V7,V8,V9,V10";
        String VIPdjres = biGetFirst(VIPdj, des);
        if (StringUtils.isNotEmpty(VIPdjres)) {
            cyhxQZWZInfo.setCode2(VIPdjres);
        } else {
            cyhxQZWZInfo.setCode2(DefaultV);
        }
        String zhtz = "王者之影至尊套,王者之武至尊套,王者之翼至尊套,王者之势至尊套,王者之戮至尊套,王者之城至尊套,王者之力至尊套,王者之光至尊套,王者之怒至尊套,王者之心至尊套,王者之圣至尊套," +
                "王者之魄至尊套,王者之狱至尊套,王者之神至尊套,王者幻神至尊套,王者之烈至尊套,王者之启至尊套,王者之腾至尊套";
        String zhtzres = biGetAll(zhtz, des);
        if (StringUtils.isNotEmpty(zhtzres)) {
            cyhxQZWZInfo.setCode7(zhtzres);
        } else {
            cyhxQZWZInfo.setCode7(DefaultV);
        }
        String wztz = "王者之心套,王者之魄套,王者之怒套,王者之翼套,王者之影套,王者之势套,王者之武套,王者之光套,王者之力套,王者之戮套,王者之圣套,王者之城套,王者之神套,王者幻神套,王者之烈套," +
                "王者之狱套,王者之启套,王者之腾套";
        String wztzres = biGetAll(wztz, des);
        if (StringUtils.isNotEmpty(wztzres)) {
            cyhxQZWZInfo.setCode8(wztzres);
        } else {
            cyhxQZWZInfo.setCode8(DefaultV);
        }
        String wzwq = "王者之心,王者之影,王者之翼,王者之魄,王者之武,王者之势,王者之戮,王者之怒,王者之光,王者之力,王者之魂,王者之灵,王者之轮,王者之电,王者之锋,王者之啸,王者之刺,王者之击," +
                "王者之烈,王者之圣,王者之迹,王者之痕,王者之城,王者之神,王者幻神,王者之狱,王者之腾,王者之仞,王者之隐";
        String wzwqres = biGetAll(wzwq, des);
        if (StringUtils.isNotEmpty(wzwqres)) {
            cyhxQZWZInfo.setCode3(wzwqres);
        } else {
            cyhxQZWZInfo.setCode3(DefaultV);
        }
        String tswq = "黑龙魂,M4A1-星象,M200-幻神,AK47-孟德,COP 357-星象,COP 357-雷神,AWM-妙才,81式-瑜,TAC-慈,AK47-策,M4A1-仲达,AK47-奉先," +
                "巴雷特-定军,MK47-仁德,M4A1-游骑兵,M4A1-七色宝葫,斯泰尔-蝴蝶,COP 357-雷霆";
        String tswqres = CyhxCFbiGetAll(tswq, des);
        if (StringUtils.isNotEmpty(tswqres)) {
            cyhxQZWZInfo.setCode4(tswqres);
        } else {
            cyhxQZWZInfo.setCode4(DefaultV);
        }
        String pf = "王者之城-冰霜奇迹,王者幻神-冰霜奇迹,王者之戮-紫电熔岩,王者之戮-燃竞之巅,王者之势-冰霜奇迹,王者之光-HeartSho,王者之翼-燃竞之巅,王者之力-紫电熔岩,王者之力-燃竞之巅," +
                "王者之影-紫电熔岩,王者之影-燃竞之巅,王者之怒-紫电熔岩,王者之怒-燃竞之巅,王者之怒-HeartSho,王者之魄-紫电熔岩,王者之魄-燃竞之巅,王者之魄-HeartSho,王者之心-紫电熔岩," +
                "王者之心-燃竞之巅,王者之心-HeartSho,孟德-过载,仲达-过载,妙才-过载,81瑜-龙腾之力,幻神-战舞,定军-忿魔,王者之魂紫电熔岩,王者之锋紫电熔岩,王者之灵紫电熔岩,王者之啸紫电熔岩," +
                "王者之轮冰霜奇迹,M4A1-星象-璀璨星辰,AK47-策-霸魂,AK-47奉先-无双";
        String pfres = CyhxCFbiGetAll(pf, des);
        if (StringUtils.isNotEmpty(pfres)) {
            cyhxQZWZInfo.setCode10(pfres);
        } else {
            cyhxQZWZInfo.setCode10(DefaultV);
        }
        String js = "曼陀罗09-X,零-水下丽影,雅典娜,职场灵狐-赛事经理,岚兮儿,春,乔月,晴雅,雾萌萌,雨墨,王者-零,云悠悠,傲骨,蝴蝶,关小雨,英雄兰,瞳,樱,子涵,蝉";
        String jsres = CyhxCFbiGetAll(js, des);
        if (StringUtils.isNotEmpty(jsres)) {
            cyhxQZWZInfo.setCode11(jsres);
        } else {
            cyhxQZWZInfo.setCode11(DefaultV);
        }
        String slt = "王者之心手雷弹,王者之心闪光弹,王者之心烟雾弹,王者之影手雷弹,王者之影闪光弹,王者之影烟雾弹,王者之翼手雷弹,王者之翼闪光弹,王者之翼烟雾弹,王者之势手雷弹,王者之势闪光弹," +
                "王者之势烟雾弹,王者之圣手雷弹,王者之圣闪光弹,王者之圣烟雾弹,王者之兽手雷,王者之兽闪光弹,王者之兽烟雾弹";
        String sltres = CyhxCFbiGetAll(slt, des);
        if (StringUtils.isNotEmpty(sltres)) {
            cyhxQZWZInfo.setCode9(sltres);
        } else {
            cyhxQZWZInfo.setCode9(DefaultV);
        }
        cyhxQZWZInfo.setCode12(DefaultV);//英雄武器V数量
        cyhxQZWZInfo.setCode1(DefaultV);//王者武器V数量
        goodsBean.setPropertyList(cyhxQZWZInfo);
        return goodsBean;
    }

    /**
     * 封装 原神 信息
     *
     * @param accountInfo
     * @param goodsBean
     * @return
     */
    YX7881GoodsBean ysInfo(AccountInfo accountInfo, YX7881GoodsBean goodsBean) {
        goodsBean.setGameId("A5653");
        switch (accountInfo.getRegional()) {
            case "官服":
                goodsBean.setCarrierId("A5653Y001");
                goodsBean.setCarriername("游戏官方");
                goodsBean.setGroupId("A5653P001");
                goodsBean.setServerId("A5653P001001");
                break;
            case "B服":
                goodsBean.setCarrierId("A5653Y002");
                goodsBean.setCarriername("哔哩哔哩");
                goodsBean.setGroupId("A5653P002");
                goodsBean.setServerId("A5653P002001");
                break;
        }
        String des = accountInfo.getDes();
        YsInfo ysInfo = new YsInfo();
        ysInfo.setAccountType(DefaultV);
        ysInfo.setGameaccount(System.currentTimeMillis() + "" + accountInfo.getId());
        ysInfo.setGamepassword("wenkefu");
        ysInfo.setGamepasswordqr("wenkefu");
        String uid = getYSuid(des);
        if (StringUtils.isNotEmpty(uid)) {
            ysInfo.setGameuid(uid);
        } else {
            ysInfo.setGameuid(System.currentTimeMillis() + "");
        }
        ysInfo.setCsemail(DefaultV);
        ysInfo.setBindAccountType(accountInfo.getLevel());
        ysInfo.setTap(DefaultV);
        ysInfo.setPsn(DefaultV);
        String fiverole = "夜兰,刻晴,迪卢克,七七,莫娜,琴,温迪,可莉,阿贝多,钟离,达达利亚,魈,胡桃,甘雨,优菈,枫原万叶,神里绫华,宵宫,雷电将军,珊瑚宫心海,荒泷一斗,申鹤,八重神子," +
                "神里绫人,提纳里,赛诺,妮露,纳西妲,流浪者,艾尔海森,迪希雅";
        String fiveroleres = biGetAll(fiverole, des);
        if (StringUtils.isNotEmpty(fiveroleres)) {
            ysInfo.setFiverole(fiveroleres);
        } else {
            ysInfo.setFiverole(DefaultV);
        }
        String fivewp = "若水,斫峰之刃,尘世之锁,无工之剑,贯虹之槊,风鹰剑,四风原典,和璞鸢,狼的末路,阿莫斯之弓,天空之刃,天空之傲,天空之脊,天空之卷,天空之翼,磐岩结绿,护摩之杖,终末嗟叹之诗," +
                "松籁响起之时,苍古自由之誓,雾切之回光,飞雷之弦振,薙草之稻光,不灭月华,息灾,神乐之真意,波乱月白经津,冬极白星,赤角石溃杵,猎人之径,赤沙之杖,圣显之钥,千夜浮梦,图莱杜拉的回忆,裁叶萃光,苇海信标";
        String fivewpres = biGetAll(fivewp, des);
        if (StringUtils.isNotEmpty(fivewpres)) {
            ysInfo.setFivewp(fivewpres);
        } else {
            ysInfo.setFivewp(DefaultV);
        }
        ysInfo.setLevel(DefaultV);
        ysInfo.setGoldCardNum(DefaultV);
        //接口要求：
        //如果要传子垂直属性,子垂直属性的值必须以父垂直属性里的值作为key,目前账号提供的信息不足以精确匹配.
//        Map subParams = new HashMap();
//        String sub_fiveroleStr = "0命夜兰,1命夜兰,2命夜兰,3命夜兰,4命夜兰,5命夜兰,满命夜兰,0命刻晴,1命刻晴,2命刻晴,3命刻晴,4命刻晴,5命刻晴,满命刻晴,0命迪卢克," +
//                "1命迪卢克," +
//                "2命迪卢克,3命迪卢克,4命迪卢克,5命迪卢克,满命迪卢克,0命七七,1命七七,2命七七,3命七七,4命七七,5命七七,满命七七,0命莫娜,1命莫娜,2命莫娜,3命莫娜,4命莫娜,5命莫娜,
//                满命莫娜," +
//                "0命琴,1命琴,2命琴,3命琴,4命琴,5命琴,满命琴,0命温迪,1命温迪,2命温迪,3命温迪,4命温迪,5命温迪,满命温迪,0命可莉,1命可莉,2命可莉,3命可莉,4命可莉,5命可莉,满命可莉," +
//                "0命阿贝多,1命阿贝多,2命阿贝多,3命阿贝多,4命阿贝多,5命阿贝多,满命阿贝多,0命钟离,1命钟离,2命钟离,3命钟离,4命钟离,5命钟离,满命钟离,0命达达利亚,1命达达利亚,2命达达利亚," +
//                "3命达达利亚,4命达达利亚,5命达达利亚,满命达达利亚,0命魈,1命魈,2命魈,3命魈,4命魈,5命魈,满命魈,0命胡桃,1命胡桃,2命胡桃,3命胡桃,4命胡桃,5命胡桃,满命胡桃,0命甘雨," +
//                "1命甘雨,2命甘雨,3命甘雨,4命甘雨,5命甘雨,满命甘雨,0命优菈,1命优菈,2命优菈,3命优菈,4命优菈,5命优菈,满命优菈,0命枫原万叶,1命枫原万叶,2命枫原万叶,3命枫原万叶,
//                4命枫原万叶," +
//                "5命枫原万叶,满命枫原万叶,0命神里绫华,1命神里绫华,2命神里绫华,3命神里绫华,4命神里绫华,5命神里绫华,满命神里绫华,0命宵宫,1命宵宫,2命宵宫,3命宵宫,4命宵宫,5命宵宫,满命宵宫," +
//                "0命雷电将军,1命雷电将军,2命雷电将军,3命雷电将军,4命雷电将军,5命雷电将军,满命雷电将军,0命珊瑚宫心海,1命珊瑚宫心海,2命珊瑚宫心海,3命珊瑚宫心海,4命珊瑚宫心海,5命珊瑚宫心海," +
//                "满命珊瑚宫心海,0命荒泷一斗,1命荒泷一斗,2命荒泷一斗,3命荒泷一斗,4命荒泷一斗,5命荒泷一斗,满命荒泷一斗,0命申鹤,1命申鹤,2命申鹤,3命申鹤,4命申鹤,5命申鹤,满命申鹤,
//                0命八重神子," +
//                "1命八重神子,2命八重神子,3命八重神子,4命八重神子,5命八重神子,满命八重神子,0命神里绫人,1命神里绫人,2命神里绫人,3命神里绫人,4命神里绫人,5命神里绫人,满命神里绫人,0命提纳里," +
//                "1命提纳里,2命提纳里,3命提纳里,4命提纳里,5命提纳里,满命提纳里,0命赛诺,1命赛诺,2命赛诺,3命赛诺,4命赛诺,5命赛诺,满命赛诺,0命妮露,1命妮露,2命妮露,3命妮露,4命妮露," +
//                "5命妮露,满命妮露,0命纳西妲,1命纳西妲,2命纳西妲,3命纳西妲,4命纳西妲,5命纳西妲,满命纳西妲,0命流浪者,1命流浪者,2命流浪者,3命流浪者,4命流浪者,5命流浪者,满命流浪者," +
//                "0命艾尔海森,1命艾尔海森,2命艾尔海森,3命艾尔海森,4命艾尔海森,5命艾尔海森,满命艾尔海森,0命迪希雅,1命迪希雅,2命迪希雅,3命迪希雅,4命迪希雅,5命迪希雅,满命迪希雅";
//        Map sub_fiveroleMap = getSubParams(sub_fiveroleStr, des);
//        subParams.put("sub_fiverole", sub_fiveroleMap);
//        String sub_fivewpStr = "精1若水,精2若水,精3若水,精4若水,精5若水,精1斫峰之刃,精2斫峰之刃,精3斫峰之刃,精4斫峰之刃,精5斫峰之刃,精1尘世之锁,精2尘世之锁,精3尘世之锁," +
//                "精4尘世之锁,精5尘世之锁,精1无工之剑,精2无工之剑,精3无工之剑,精4无工之剑,精5无工之剑,精1贯虹之槊,精2贯虹之槊,精3贯虹之槊,精4贯虹之槊,精5贯虹之槊,精1风鹰剑,精2风鹰剑," +
//                "精3风鹰剑,精4风鹰剑,精5风鹰剑,精1四风原典,精2四风原典,精3四风原典,精4四风原典,精5四风原典,精1和璞鸢,精2和璞鸢,精3和璞鸢,精4和璞鸢,精5和璞鸢,精1狼的末路,精2狼的末路," +
//                "精3狼的末路,精4狼的末路,精5狼的末路,精1阿莫斯之弓,精2阿莫斯之弓,精3阿莫斯之弓,精4阿莫斯之弓,精5阿莫斯之弓,精1天空之刃,精2天空之刃,精3天空之刃,精4天空之刃,精5天空之刃," +
//                "精1天空之傲,精2天空之傲,精3天空之傲,精4天空之傲,精5天空之傲,精1天空之脊,精2天空之脊,精3天空之脊,精4天空之脊,精5天空之脊,精1天空之卷,精2天空之卷,精3天空之卷,精4天空之卷," +
//                "精5天空之卷,精1天空之翼,精2天空之翼,精3天空之翼,精4天空之翼,精5天空之翼,精1磐岩结绿,精2磐岩结绿,精3磐岩结绿,精4磐岩结绿,精5磐岩结绿,精1护摩之杖,精2护摩之杖,精3护摩之杖," +
//                "精4护摩之杖,精5护摩之杖,精1终末嗟叹之诗,精2终末嗟叹之诗,精3终末嗟叹之诗,精4终末嗟叹之诗,精5终末嗟叹之诗,精1松籁响起之时,精2松籁响起之时,精3松籁响起之时,精4松籁响起之时," +
//                "精5松籁响起之时,精1苍古自由之誓,精2苍古自由之誓,精3苍古自由之誓,精4苍古自由之誓,精5苍古自由之誓,精1雾切之回光,精2雾切之回光,精3雾切之回光,精4雾切之回光,精5雾切之回光," +
//                "精1飞雷之弦振,精2飞雷之弦振,精3飞雷之弦振,精4飞雷之弦振,精5飞雷之弦振,精1薙草之稻光,精2薙草之稻光,精3薙草之稻光,精4薙草之稻光,精5薙草之稻光,精1不灭月华,精2不灭月华," +
//                "精3不灭月华,精4不灭月华,精5不灭月华,精1息灾,精2息灾,精3息灾,精4息灾,精5息灾,精1神乐之真意,精2神乐之真意,精3神乐之真意,精4神乐之真意,精5神乐之真意,精1波乱月白经津," +
//                "精2波乱月白经津,精3波乱月白经津,精4波乱月白经津,精5波乱月白经津,精1冬极白星,精2冬极白星,精3冬极白星,精4冬极白星,精5冬极白星,精1赤角石溃杵,精2赤角石溃杵,精3赤角石溃杵," +
//                "精4赤角石溃杵,精5赤角石溃杵,精1猎人之径,精2猎人之径,精3猎人之径,精4猎人之径,精5猎人之径,精1赤沙之杖,精2赤沙之杖,精3赤沙之杖,精4赤沙之杖,精5赤沙之杖,精1圣显之钥,
//                精2圣显之钥," +
//                "精3圣显之钥,精4圣显之钥,精5圣显之钥,精1千夜浮梦,精2千夜浮梦,精3千夜浮梦,精4千夜浮梦,精5千夜浮梦,精1图莱杜拉的回忆,精2图莱杜拉的回忆,精3图莱杜拉的回忆,精4图莱杜拉的回忆," +
//                "精5图莱杜拉的回忆,精1裁叶萃光,精2裁叶萃光,精3裁叶萃光,精4裁叶萃光,精5裁叶萃光,精1苇海信标,精2苇海信标,精3苇海信标,精4苇海信标,精5苇海信标";
//        Map sub_fivewpMap = getSubParams(sub_fivewpStr, des);
//        subParams.put("sub_fivewp", sub_fivewpMap);
//        goodsBean.setChildPropertyList(subParams);
        goodsBean.setPropertyList(ysInfo);
        return goodsBean;
    }

    /**
     * 获取 des 里 UID的值
     *
     * @param des
     * @return
     */
    String getYSuid(String des) {
        String uid = "";
        if (StringUtils.isNotEmpty(des)) {
            String updes = des.toUpperCase();
            if (updes.contains("UID")) {
                updes = updes.substring(updes.indexOf("UID"), updes.indexOf("UID") + 14);
                uid = getNum(updes);
            }
        }
        return uid;
    }

    /**
     * 提取字符串里的数字
     *
     * @param str
     * @return
     */
    String getNum(String str) {
        String result = "";
        if (StringUtils.isNotEmpty(str)) {
            String regEx = "[^0-9]";
            Pattern p = Pattern.compile(regEx);
            Matcher m = p.matcher(str);
            result = m.replaceAll("").trim();
        }
        return result;
    }

    Map getSubParams(String str1, String str2) {
        Map subParams = new HashMap();
        if (StringUtils.isEmpty(str2) || StringUtils.isEmpty(str1)) {
            return subParams;
        }
        String[] str1sz = str1.split(",");
        boolean is = false;
        for (String s : str1sz) {
            if (str2.contains(s)) {
                subParams.put(s.substring(2, s.length()), s);
            }
        }
        return subParams;
    }

    /**
     * String字符串的值 =号拼接 转Map
     *
     * @param b
     * @return
     */
    Map stringTOmap(String b) {
        b = b.substring(1, b.length() - 1);
        Map docType = new HashMap();
        java.util.StringTokenizer items;
        for (StringTokenizer entrys = new StringTokenizer(b, ","); entrys.hasMoreTokens();
             docType.put(items.nextToken(), items.hasMoreTokens() ? ((Object) (items.nextToken())) : null)) {
            items = new StringTokenizer(entrys.nextToken(), "=");
        }
        return docType;
    }

}